package com.youlu.campus.admin.platform;
import com.youlu.campus.entity.VO.req.AppUrlLinkQueryVO;
import com.youlu.campus.service.platform.AppUrlLinkService;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;

/**
 * 小程序链接配置
 */
@RestController
public class AppUrlLinkController {
    @Autowired
    private AppUrlLinkService appUrlLinkService;

    @PostMapping("/app-url-link/list")
    public QResult list(@RequestBody @NotNull AppUrlLinkQueryVO req) {
        return QResult.success(appUrlLinkService.list(req));
    }

    @GetMapping("/app-url-link/delete")
    public QResult delete(@RequestParam("id") String id) {
        return QResult.success(appUrlLinkService.delete(id));
    }

    @GetMapping("/app-url-link/generate")
    public QResult generate(@RequestParam("id") String id) {
        return QResult.success(appUrlLinkService.delete(id));
    }
}
